<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="p" uri="/WEB-INF/tld/pagination.tld"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<meta http-equiv="content-type" content="text/html; charset=UTF-8">
		<title>采购发票管理</title>
		<link rel="stylesheet" type="text/css"
			href="<%=request.getContextPath()%>/css/public.css">
		<script type="text/javascript"
			src="<%=request.getContextPath()%>/js/sorttable.js"></script>
		<script language="JavaScript" charset="UTF-8"
			src="<%=request.getContextPath()%>/js/date1.js"></script>
		<script language="JavaScript"
			src="<%=request.getContextPath()%>/js/public.js"></script>
		<script language="JavaScript"
			src="<%=request.getContextPath()%>/js/salesprice.js" charset="utf-8"></script>

	</head>
	<body>
		<div id="info_all">
			<div id="info_top">
				采购发票管理
			</div>
			<s:form action="getStockInvoiceList.action"theme="simple" id="delrow"
				cssStyle="margin-top:0px;">
			<!-- 主输入区 -->
			<!-- 功能按钮 -->
			<div id="btn">
				<input type="button" value="新增" onClick="addAction('showAddStockInvoice')"
					onFocus="this.blur()" onMouseOver="this.className='btnover'"
					onmouseout="this.className='btnout'" class="btnsize" />
				<input type="button" value="修改" onClick="" onFocus="this.blur()"
					onmouseover="this.className='btnover'"
					onmouseout="this.className='btnout'" class="btnsize" />
				<input type="button" value="删除" onClick="delrow()"
					onFocus="this.blur()" onMouseOver="this.className='btnover'"
					onmouseout="this.className='btnout'" class="btnsize" />
				<input type="button" value="上查" onClick="" onFocus="this.blur()"
					onmouseover="this.className='btnover'"
					onmouseout="this.className='btnout'" class="btnsize" />
				<input type="button" value="下查" onClick="" onFocus="this.blur()"
					onmouseover="this.className='btnover'"
					onmouseout="this.className='btnout'" class="btnsize" />
				<input type="button" value="审核" onClick="" onFocus="this.blur()"
					onmouseover="this.className='btnover'"
					onmouseout="this.className='btnout'" class="btnsize" />
				<input type="button" value="反审核" onClick="" onFocus="this.blur()"
					onmouseover="this.className='btnover'"
					onmouseout="this.className='btnout'" class="btnsize" />
				<input type="button" value="作废" onClick="" onFocus="this.blur()"
					onmouseover="this.className='btnover'"
					onmouseout="this.className='btnout'" class="btnsize" />
				<input type="button" value="反作废" onClick="" onFocus="this.blur()"
					onmouseover="this.className='btnover'"
					onmouseout="this.className='btnout'" class="btnsize" />
				<input type="button" value="核销" onClick="" onFocus="this.blur()"
					onmouseover="this.className='btnover'"
					onmouseout="this.className='btnout'" class="btnsize" />
				<input type="button" value="反核销" onClick="" onFocus="this.blur()"
					onmouseover="this.className='btnover'"
					onmouseout="this.className='btnout'" class="btnsize" />
				<input type="button" value="钩稽" onClick="" onFocus="this.blur()"
					onmouseover="this.className='btnover'"
					onmouseout="this.className='btnout'" class="btnsize" />
				<input type="button" value="反钩稽" onClick="" onFocus="this.blur()"
					onmouseover="this.className='btnover'"
					onmouseout="this.className='btnout'" class="btnsize" />
				<input type="button" value="凭证" onClick="" onFocus="this.blur()"
					onmouseover="this.className='btnover'"
					onmouseout="this.className='btnout'" class="btnsize" />
				<input type="button" value="关闭" onClick="" onFocus="this.blur()"
					onmouseover="this.className='btnover'"
					onmouseout="this.className='btnout'" class="btnsize" />
				<input type="button" value="反关闭" onClick="" onFocus="this.blur()"
					onmouseover="this.className='btnover'"
					onmouseout="this.className='btnout'" class="btnsize" />
				<input type="button" value="拆分" onClick="" onFocus="this.blur()"
					onmouseover="this.className='btnover'"
					onmouseout="this.className='btnout'" class="btnsize" />
				<input type="button" value="合并" onClick="" onFocus="this.blur()"
					onmouseover="this.className='btnover'"
					onmouseout="this.className='btnout'" class="btnsize" />
				<input type="button" value="明细" onClick="showPHiRPDetail()" onFocus="this.blur()"
					onmouseover="this.className='btnover'"
					onmouseout="this.className='btnout'" class="btnsize" />

			</div>
			<div id="info_main">
				<!-- 查询栏 -->
				
				<div id="select">
					<hr>
					<table>
						<tr>
							<td width="55">
								供应商名
							</td>
							<td>
								<s:hidden name="stockInvoiceModel.supplierId" id="supplierId"></s:hidden>
								<s:textfield name="" size="12" id="supplierName" readonly="true"></s:textfield><img src="images/kookup.gif" style="cursor:pointer" onclick="openWin('supplierSelect.action','supplier',750,700,0)">
							</td>
							<td width="55">
								发票号码
							</td>
							<td width="120px">
								<s:textfield name="stockInvoiceModel.invoiceNo" size="12" id="invoiceNo"></s:textfield>
							</td>
							<td width="55">
								审核状态
							</td>
							<td width="120px">
								<s:select list="#{'2':'全部','0':'未审核','1':'审核'}" cssStyle="width:96px" name="stockInvoiceModel.isAuditing"></s:select>
							</td>
							<td width="55px">
								发票日期
							</td>
							<td width="120px">
							<input name="stockInvoiceModel.invoiceDate" id="invoiceDate" size="12" value=''
								readonly='readonly' style='cursor: hand'
								onclick=calendar.setHook(this)>
							</td>
						</tr>

					</table>
				</div>
				<div class="sele">
					<input type="submit" value="查询" onFocus="this.blur()"
						onmouseover="this.className='btnover'"
						onmouseout="this.className='btnout'" class="btnsize" />
					<input type="reset" value="重置" onFocus="this.blur()"
						onmouseover="this.className='btnover'"
						onmouseout="this.className='btnout'" class="btnsize"/>
						<hr>
				</div>
				<!-- 信息显示栏 -->
				<div id="info_info1">
					<table id="info_table" width="1440px" cellspacing=1px
						cellpadding=1px class="sortable">
						<thead id="head">
							<tr>
								<th>
									<input type="checkbox" onClick="selectAll()" />
								</th>
								<th width="80">
									审核标志
								</th>
								<th width="80">
									钩稽标志
								</th>
								<th width="80">
									作废标志
								</th>
								<th width="80">
									日期
								</th>
								<th width="80">
									发票号码
								</th>
								<th width="80">
									凭证字号
								</th>
								<th width="80">
									供应商
								</th>
								<th width="80">
									币别
								</th>
								<th width="80">
									源单类型
								</th>
								<th width="80">
									采购方式
								</th>
								<th width="80">
									部门
								</th>
								<th width="80">
									业务员
								</th>
								<th width="80">
									开票人
								</th>
								<th width="80">
									钩稽人
								</th>
								<th width="80">
									制单人
								</th>
								<th width="80">
									审核人
								</th>
								<th width="80">
									备注
								</th>
							</tr>
						</thead>
						<tbody id="mbody">
						<s:iterator value="stockInvoiceDTOList">
								<tr>
									<td>
										<s:checkbox name="rowlist" fieldValue="%{stockInvoiceModel.stockInvoiceId}"
											theme="simple"></s:checkbox>
									</td>
									<td>
										<s:if test="stockInvoiceModel.isAuditing==1">审核</s:if>
										<s:else>未审核</s:else>
									</td>
									<td>
										<s:if test="stockInvoiceModel.isHook==1">钩稽</s:if>
										<s:else>未钩稽</s:else>
									</td>
									<td>
										<s:if test="stockInvoiceModel.isCancel==1">作废</s:if>
										<s:else>未作废</s:else>
									</td>
									<td>
										<s:property value="stockInvoiceModel.invoiceDate" />
									</td>
									<td>
										<s:property value="stockInvoiceModel.invoiceNo" />
									</td>
									<td>
										<s:property value="stockInvoiceModel.invoiceNo" />
									</td>
									<td>
										<s:property value="supplierName" />
									</td>
									<td>
										<s:property value="currencyName" />
									</td>
									<td>
										<s:if test="stockInvoiceModel.sourceBillType==0"></s:if>
										<s:elseif test="stockInvoiceModel.sourceBillType==1">采购订单</s:elseif>
										<s:elseif test="stockInvoiceModel.sourceBillType==2">采购入库单</s:elseif>
										<s:else>蓝字采购发票</s:else>
									</td>
									<td>
										<s:if test="stockInvoiceModel.stockWay==0">现购</s:if>
										<s:else>赊购</s:else>
									</td>
									<td>
										<s:property value="departmentName" />
									</td>
									<td>
										<s:property value="businesser" />
									</td>
									<td>
										<s:property value="stockInvoiceModel.ticketer" />
									</td>
									<td>
										<s:property value="stockInvoiceModel.fhooker" />
									</td>
									<td>
										<s:property value="stockInvoiceModel.makeBiller" />
									</td>
									<td>
										<s:property value="stockInvoiceModel.auditinger" />
									</td>
									<td>
										<s:property value="stockInvoiceModel.remark" />
									</td>
								</tr>
							</s:iterator>
						</tbody>
						<tfoot>
							<tr></tr>
						</tfoot>
					</table>
					<script language="javascript">  
						//("表格名称","奇数行背景","偶数行背景","点击后背景");
						 mouseclick("info_table","#ffffff","#ffffff","#e6f0fd");
						 //("表格名称","奇数行背景","偶数行背景");
						 //setcolor("t","#ffffff","#ffffff");
					</script>
				</div>
				
			</div>
			</s:form>
		</div>
	</body>
</html>
